<div align="center">
	<?
	if($loi != ""){
		echo "<ul>\n";
			foreach ($loi as $error){
				echo "<li>$error<li>\n"; 
			}
		echo "</ul>\n";
	}
	?>
	<form action="index.php?module=xe&action=add" enctype="multipart/form-data" method="post">
		<table>
			<tr>
				<td>Ten hang</td>
				<td>
					<select name="hang">
						<?php
							$hang = new mhangxe();
							$data = $hang->hangxe();
							foreach($data as $row){
								echo "<option value='$row[hang_id]'>$row[tenhang]</option>";
							}
						?>
					</select>
				</td>
			</tr>
			<tr>
				<td>Loai xe</td>
				<td>
					<select name="loai">
						<?php
							$loai = new mloai();
							$data = $loai->listloai();
							foreach($data as $row){
								echo "<option value='$row[loaixe_id]'>$row[tenloai]</option>";
							}
						?>
					</select>
				</td>
			</tr>
			<tr>
				<td>Trang thai</td>
				<td>
					<select name="tt">
						<?php
							$tt = new mtrangthai();
							$data = $tt->show();
							foreach($data as $row){
								echo "<option value='$row[loaitt_id]'>$row[tentt]</option>";
							}
						?>
					</select>
				</td>
			</tr>
			<tr>
				<td>Ten xe</td>
				<td><input type="text" name="xe" /></td>
			</tr>
			<tr>
				<td>Hinh anh</td>
				<td><input type="file" name="img" /></td>
			</tr>
			<tr>
				<td>Kiem duyet</td>
				<td>
					<input type="radio" name="kiemduyet" value="N" checked="checked" />No
					<input type="radio" name="kiemduyet" value="Y" />Yes
				</td>
			</tr>
			<tr>
				<td>Gia</td>
				<td><input type="text" name="gia" /></td>
			</tr>
			<tr>
				<td>&nbsp</td>
				<td><input type="submit" name="ok" value="Add" /></td>
			</tr>
		</table>
	</form>
</div>